package com.xiaoshu.log;

import java.lang.reflect.Method;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature;

public class LogAspect {

	public Object execute(ProceedingJoinPoint joinPoint) throws Throwable{
		//执行过程方法
		Object object = joinPoint.proceed();
		
		MethodSignature signature = (MethodSignature)joinPoint.getSignature();
		Method method = signature.getMethod();
		System.out.println("========>日志信息输出  开始...");
		System.out.println(joinPoint.getTarget().getClass().getName());
		
		System.out.println(method.getName());
		System.out.println("========>日志信息输出  结束...");
		//返回执行方法结果
		return object;
	}
	
}
